const Router = require('koa-router');
const {verifyAuth} = require('../middleware/auth.middleware');
const {profile, create, update, isExistProfile} = require('../controller/profile.controller');
const profileRouter = new Router({prefix: "/profile"});

// 判断是否有资料
profileRouter.get("/isExistProfile", verifyAuth, isExistProfile);
// 添加我的资料
profileRouter.post("/", verifyAuth, create);
// 获取我的资料
profileRouter.get("/", profile);
// 修改我的资料
profileRouter.patch("/", verifyAuth, update);

module.exports = profileRouter;
